#include<iostream>
#include <cstdio>
#include <cstring>
using namespace std;

#define MAX_K 50
char src[MAX_K];
int num[MAX_K];

int main(){
	int len,cnt,i,j;
	while(scanf("%s",src)!= EOF){
		memset(num,0,sizeof(num));
		len = strlen(src);
		cnt = 0;
		for(i=len-1;i>=2;i--,cnt += 3){
			num[cnt] += src[i] -'0';
			for(j=0;j<=MAX_K;j++)
			    num[j] *= 125;
			for(j=0;j<=MAX_K;j++){
				if(num[j] >= 10){
					num[j+1] += num[j]/10;
					num[j] %= 10;
				}
			}
		}
		printf("%s [8] = 0.",src);
		for(i=3*(len-2)-1;i>=0;i--)
		    printf("%d",num[i]);
		printf(" [10]\n");
		memset(src,0,sizeof(src));
	}
	return 0;
}
